import React, { Component } from 'react';
import { Button } from 'antd';

const AuthorizeToolbar = (props) => {

  const { onShowAuthorize, onDeleteAuthorize, correlateType } = props;

  const iconStyle = {
    verticalAlign: "bottom",
    marginRight: "5px",
  }

  return (
    <div style={{marginTop: "15px"}}>
      <Button type="primary"
              size="default"
              icon={<i className="ri-lock-2-line" style={iconStyle}></i>}
              onClick={onShowAuthorize}
      >{ correlateType == 0 || correlateType == 2 ? "菜单授权" : "数据授权" }</Button>
      <Button style={{marginLeft: "15px", color: "#FE9400", border: "1px solid #FE9400"}}
              icon={<i className="ri-links-line" style={iconStyle}></i>}
              onClick={onDeleteAuthorize}
      >删除</Button>
    </div>
  );
}

export default AuthorizeToolbar;
